package org.csu.corp.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class MonthSalary implements Serializable {
    private static final long serialVersionUID=1L;

    private Integer id;
    @DateTimeFormat(pattern = "yyyy-MM")
    private Date time;
    private Employee employee;
    private Double tot;
    private Integer normalSign;
    private Integer lateInSign;
    private Integer earlyOutSign;
    private Integer signTime;
    private Integer miss;

    public Integer getSignTime() {
        return signTime;
    }

    public void setSignTime(Integer signTime) {
        this.signTime = signTime;
    }

    public Integer getMiss() {
        return miss;
    }

    public void setMiss(Integer miss) {
        this.miss = miss;
    }

    public Integer getNormalSign() {
        return normalSign;
    }

    public void setNormalSign(Integer normalSign) {
        this.normalSign = normalSign;
    }

    public Integer getLateInSign() {
        return lateInSign;
    }

    public void setLateInSign(Integer lateInSign) {
        this.lateInSign = lateInSign;
    }

    public Integer getEarlyOutSign() {
        return earlyOutSign;
    }

    public void setEarlyOutSign(Integer earlyOutSign) {
        this.earlyOutSign = earlyOutSign;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @JsonFormat(pattern="yyyy-MM",timezone = "GMT+8")
    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Employee getEmployee() {
        return employee;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }

    public Double getTot() {
        return tot;
    }

    public void setTot(Double tot) {
        this.tot = tot;
    }

    @Override
    public String toString() {
        return "MonthSalary{" +
                "id: " + id +
                " name: " + employee.getName() +
                " time: " + time +
                " tot: " + tot +
                " normalSign: " + normalSign +
                " lateInSign: " + lateInSign +
                " earlyOutSign: " + earlyOutSign +
                " miss: " + miss;
    }
}
